import type { GetCodeData, GetCodeParams, LoginCodeData, LoginCodeParams, UserData } from "@/types/user";
import { request } from "@/utils/http";

// 1. 获取短信验证码
export const getCodeApi = (params: GetCodeParams)=>{
  return request.get<null, GetCodeData>('/code', {params})
}

// 2. 手机验证码登录
export const loginCodeApi = (params: LoginCodeParams)=>{
  return request.post<null, LoginCodeData>('/login', params)
}

// 3. 获取个人信息
export const getUserInfoApi = () => request.get<null, UserData>('/patient/myUser')